home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 2
/
Geek_Gadgets_2_2352.bin
/
lists
/
ade-gcc.archive.9602.gz
/
ade-gcc.archive.9602
/
000032_owner-ade-gcc_Mon Feb 12 08:07:48 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-02-28
|
3KB
Return-Path: <owner-ade-gcc>
Received: by fishpond (Smail3.1.29.1 #57)
id m0tlxys-000gXda; Mon, 12 Feb 96 08:07 EST
Sender: owner-ade-gcc
Received: from oersted.gbar.dtu.dk by fishpond with smtp
(Smail3.1.29.1 #57) id m0tlxym-000gXUC; Mon, 12 Feb 96 08:07 EST
Received: (from c948374@localhost) by oersted.gbar.dtu.dk (8.7.3/8.7.3) id OAA11060; Mon, 12 Feb 1996 14:06:34 +0100 (MET)
Date: Mon, 12 Feb 1996 14:06:33 +0100 (MET)
From: Rask Ingemann Lambertsen <c948374@student.dtu.dk>
To: amiga-gcc-port@nic.funet.fi, ade-gcc@amigalib.com
Subject: Passing function arguments in registers
Message-ID: <Pine.HPP.3.91.960212140231.3858C-100000@oersted.gbar.dtu.dk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Sender: owner-ade-gcc@amigalib.com
Precedence: bulk
Hi,
Following the discussion on amiga-gcc-port of whether or not it is a
good to pass arguments in registers when making function calls, I decided
to see what the GCC documentation had to say about that. From gcc.guide,
"Interfacing to GCC output":
" GNU CC uses the system's standard convention for passing arguments.
On some machines, the first few arguments are passed in registers; in
others, all are passed on the stack. It would be possible to use
registers for argument passing on any machine, and this would probably
result in a significant speedup. But the result would be complete
incompatibility with code that follows the standard convention. So th=
is
change is practical only if you are switching to GNU CC as the sole C
compiler for the system. We may implement register argument passing o=
n
certain machines once we have a complete GNU system so that we can
compile the libraries with GNU CC."
To me, it makes three things clear:
1) Passing arguments in registers *does* provide a speedup and *is* an
advantage.
2) It causes incompatibility with existing link libraries.
3) GCC already has support for passing arguments in registers. We just
have to utilitze it.
Since I don't use link libraries in my programmes, I don't see any
problems at all. But to shut up those people who *do* see the world comin=
g
to an end (sorry) because of this, I suggest making a command line switch
to choose between the different argument passing conventions.
Since it is my impression that ADE is more Amiga-focused than the=20
people on amiga-gcc-port, I'd also like to know what the ADE people think=
=20
about it.
Regards,
/=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF\
| Rask Ingemann Lambertsen | E-mail: c948374@student.dtu.dk =
|
| Amiga GNU CC README maintainer | WWW: http://www.gbar.dtu.dk/~c948374/ =
|
| Keyboard error: <Ctrl> and <Alt> are stuck - press <Del> to continue =
|